package com.yegs.jltqc.dao;

import com.yegs.jltqc.VO.Formwork;
import com.yegs.jltqc.VO.OutCome;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FormworkRepository extends JpaRepository<Formwork,Long> {

    Page<Formwork> findFormworkByNameAndMold(String name, String mold, Pageable pageable);

    Page<Formwork> findFormworkByMold(String mold, Pageable pageable);

    List<Formwork> findFormworkByMold(String mold);

    Formwork findFirstByIdIsAfterAndMold(Long id, String mold);

    Formwork findFirstByIdBeforeAndMoldOrderByIdDesc(Long id, String mold);

    Formwork findFirstByMoldOrderById(String mold);

    Formwork findFirstByMoldOrderByIdDesc(String mold);

    Formwork findFormworkByNameAndVersion(String name, String version);


}
